package com.hotelvip.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 商品实体类
 * @author Lzh
 * @date 2020/12/16 9:29
 */
@Data
@TableName(value = "ht_item")
@ApiModel(value = "商品对象",description = "商品对象Item")
public class Item extends BasePojo {
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "商品id",name = "id")
    private Long id;
    @ApiModelProperty(value = "商品标题",name = "title")
    private String title;
    @ApiModelProperty(value = "添加人",name = "addPeople")
    private String addPeople;
    @ApiModelProperty(value = "商品价值(单位：分)",name = "price")
    private Long price;
    @ApiModelProperty(value = "单位",name = "unit")
    private String unit;
    @ApiModelProperty(value = "条形码",name = "barcode")
    private String barcode;
    @ApiModelProperty(value = "图片",name = "image")
    private String image;
    @ApiModelProperty(value = "所属分类",name = "cId")
    private Long cId;
    @ApiModelProperty(value = "商品状态enum:1正常，2下架，3待上架",name = "status")
    private Integer status;
    @ApiModelProperty(value = "置换损益比小数",name = "iScale")
    private BigDecimal iScale;
    @ApiModelProperty(value = "周六日损益比",name = "wScale")
    private BigDecimal wScale;
    @ApiModelProperty(value = "法定假日损益比",name = "fScale")
    private BigDecimal fScale;
    @ApiModelProperty(value = "上架时间",name = "upload")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date upload;
    @ApiModelProperty(value = "周期 到期时间",name = "dueTime")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date dueTime;
    @ApiModelProperty(value = "供货商",name = "supplier")
    private String supplier;
    @ApiModelProperty(value = "备注",name = "comment")
    private String comment;
    @ApiModelProperty(value = "可置换商品id数组，用于添加",name = "tIds")
    @TableField(exist = false)
    private Long[] tIds;
    @ApiModelProperty(value = "权次数",name = "total")
    @TableField(exist = false)
    private Integer total;




}
